import {
    Document
} from "mongoose"
import {Prop, Schema, SchemaFactory} from "@nestjs/mongoose";

export type UserScoreDocument = Score & Document

/* 用户评分（针对图书）*/
@Schema({timestamps:true})
export class Score extends Document {
    @Prop({required: true})
    userId: string

    @Prop({required: true})
    score: number

    @Prop({required: true})
    bookId: string
}
export const UserScoreSchema = SchemaFactory.createForClass(Score)
